package com.zmx.job.execute.handler.b2c.order.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zmx.job.execute.handler.common.base.BaseEntity;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * @author zhaomxr
 * null
 */
@Data
@Entity
@Table(name = "b2c_order")
@DynamicInsert
@DynamicUpdate
@Inheritance(strategy = InheritanceType.JOINED)
public class B2COrder extends BaseEntity {

	/**
	 * 活动id
	 */
	@Column(name = "active_id")
	private Long activeId;

	/**
	 * null
	 */
	@Column(name = "member_id")
	private Long memberId;

	/**
	 * 父单号
	 */
	@Column(name = "parent_sn")
	private String parentSn;

	/**
	 * 为系统为订单生成的唯一标识码，编码要求，包含日期，渠道；
	 */
	@Column(name = "order_sn")
	private String orderSn;

	/**
	 * 订单外部编号
	 */
	@Column(name = "out_sn")
	private String outSn;

	/**
	 * 配送单号
	 */
	@Column(name = "delivery_no")
	private String deliveryNo;

	/**
	 * 订单状态 0未确认，1已确认，2已完成，3已取消，4取消中，5拒收，6拒收入库
	 */
	@Column(name = "order_status")
	private Integer orderStatus;

	/**
	 * 支付状态 0未支付，1已支付，2已退款
	 */
	@Column(name = "payment_status")
	private Integer paymentStatus;

	/**
	 * 1:未配送 2：已配送
	 */
	@Column(name = "delivery_status")
	private Integer deliveryStatus;

	/**
	 * 平台 0-自营
	 */
	@Column(name = "platform")
	private Integer platform;

	/**
	 * 来源 0-小程序
	 */
	@Column(name = "order_source")
	private String orderSource;

	/**
	 * 用户名
	 */
	@Column(name = "consignee")
	private String consignee;

	/**
	 * 电话
	 */
	@Column(name = "phone")
	private String phone;

	/**
	 * 地址
	 */
	@Column(name = "address")
	private String address;

	/**
	 * null
	 */
	@Column(name = "area")
	private String area;

	/**
	 * 支付总金额
	 */
	@Column(name = "amount_paid")
	private Double amountPaid;

	/**
	 * 运费
	 */
	@Column(name = "freight")
	private Double freight;

	/**
	 * 订单金额
	 */
	@Column(name = "total_price")
	private Double totalPrice;

	/**
	 * 买家留言
	 */
	@Column(name = "leave_word")
	private String leaveWord;


}
